package yh.core.funcs.workflow.act;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import yh.core.data.YHRequestDbConn;
import yh.core.funcs.workflow.logic.YHBusinessLogic;
import yh.core.global.YHActionKeys;
import yh.core.global.YHBeanKeys;
import yh.core.global.YHConst;

public class YHBusinessAct {
	  public String getHoliday(HttpServletRequest request,
		      HttpServletResponse response) throws Exception{
		  StringBuffer sb = new StringBuffer();
		     YHRequestDbConn requestDbConn = (YHRequestDbConn) request
	          .getAttribute(YHBeanKeys.REQUEST_DB_CONN_MGR);
		  YHBusinessLogic logic=new YHBusinessLogic();
		  String typeId=request.getParameter("typeId");
		  String userId=request.getParameter("userId");
		  String result=logic.getHoliday(userId, typeId, requestDbConn.getSysDbConn());
	      sb.append("{day:'"+ result +"'");
	      sb.append("}");
		  request.setAttribute(YHActionKeys.RET_STATE, YHConst.RETURN_OK);
	      request.setAttribute(YHActionKeys.RET_MSRG, "成功取得数据");
	      request.setAttribute(YHActionKeys.RET_DATA, sb.toString());
		  return "/core/inc/rtjson.jsp";
	  }
}
